package org.tedu.day04mybatis.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.tedu.day04mybatis.pojo.User;
import org.tedu.day04mybatis.pojo.Weibo;

import java.util.List;

@Mapper
public interface WeiboMapper {
    //@Insert("INSERT INTO weibo(content,created,user_id) VALUES(#{content},#{created},#{userId})")
    int insert(Weibo weibo);

    @Delete("DELETE FROM weibo WHERE id = #{id}")
    int deleteById(Integer id);

    //@Select("SELECT id, content, created, user_id userId FROM weibo WHERE id=#{id}")
    Weibo findById(Integer id);

    int findByIds(int[] ids);
}
